package com.example.demo.controlller;

import com.example.demo.pojo.Result;
import com.example.demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {

    @Autowired
    UserService userService;

    @GetMapping("/userPost")
    public Result getUserPost(String userName){

        String Post = userService.getPost(userName);
        return Result.success(Post);
    }
}
